package enemies;

import java.awt.Dimension;
import java.awt.geom.Point2D;
import java.util.ArrayList;

import javax.swing.ImageIcon;

import projectiles.Bullet;
import projectiles.Projectile;

/**
 * @author 
 * @version 1.1
 * @since 2011-04-11
 */
public class Tank extends MobileEnemy {

	private static final ImageIcon image = new ImageIcon("images/tankbody.gif");
	private static final ImageIcon deviceImage = new ImageIcon("images/tank-cannon.gif");

	/**
	 * @see MobileEnemy#MobileEnemy(ArrayList, java.awt.geom.Point2D.Double, int, Dimension, ImageIcon, int, int, int, ImageIcon, int)
	 */
	/* /// Constructor //////////////////////////////////////// */
	public Tank(ArrayList<Point2D.Double> route, Point2D.Double position, int health, int speed) {
		super(route, position, health, new Dimension(image.getIconWidth(), image.getIconHeight()), image, 500, 200,
				speed, deviceImage, 0);
	}

	/* /// shoot //////////////////////////////////////// */
	public Projectile shoot() {
		updateFirerate();
		return new Bullet(this, getPosition(), deviceAngle, aimAtTower.getMiddle());
	}

}
